#include <bits/stdc++.h>
#define ll long long
#define For(i,a,b) for(int i = a; i <= b; i++)
#define For2(i,a,b) for(int i = a; i >= b; i--)
using namespace std;
const int N = 1e5 + 5;
int n,a[N],ans;
bool alive[N];

int main() {
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    For(i,1,n) cin >> a[i];
    For(i,1,n) alive[i] = true;
    sort(a + 1,a + n + 1);
    int l = 1,r = 2;
    while (r <= n) {
        if (alive[l] == false) {
            l++;
            if (l == r) r++;
        }
        if (a[l] == a[r]) r++;
        else {
            alive[l] = false;
            l++;
            r++;
        }
    }
    For (i,1,n) {
        if (alive[i]) ans++;
    }
    cout << ans << endl;
    return 0;
}


